﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SanguoSharp
{
    public interface IPlayer : IIdentificable
    {
        /// <summary>
        /// Gets the name of the player.
        /// </summary>
        string Name { get; }
        /// <summary>
        /// Gets the avatar of the player.
        /// </summary>
        byte[] Image { get; }

        /// <summary>
        /// Gets the value indicating wheter the player has a login password.
        /// </summary>
        bool HasPassword { get; }
        /// <summary>
        /// Gets the value indicating wheter the player is the creator of this session.
        /// </summary>
        bool IsCreator { get; }
        /// <summary>
        /// Gets the value indicating wheter the player is a bot.
        /// </summary>
        bool IsAI { get; }
        /// <summary>
        /// Gets the value indicating wheter the player has a controller assigned (is logged in).
        /// </summary>
        bool HasListener { get; }

        /// <summary>
        /// Gets the current score of the player calculated according to the official rules.
        /// </summary>
        /// <remarks>
        /// The scoring system description can be found here:
        /// http://www.SanguoSharp.cz/en/rules-and-faq/special-rules/64-official-tournament-scoring-system.html
        /// </remarks>
        int Score { get; }
        /// <summary>
        /// Gets the number of turns that player has played.
        /// </summary>
        int TurnsPlayed { get; }

        /// <summary>
        /// Gets the number of the this player's victories.
        /// </summary>
        int Victories { get; }
        /// <summary>
        /// Gets the number of the this player's victories with the specified role.
        /// </summary>
        /// <param name="role">
        /// The <see cref="SanguoSharp.Role"/> to get the result for.
        /// </param>
        /// <returns>
        /// The number of the this player's victories with the specified role.
        /// </returns>
        int GetVictories(Role role);
        /// <summary>
        /// Gets the number of the this player's victories with the specified character.
        /// </summary>
        /// <param name="role">
        /// The <see cref="SanguoSharp.CharacterType"/> to get the result for.
        /// </param>
        /// <returns>
        /// The number of the this player's victories with the specified character.
        /// </returns>
        int GetVictories(CharacterType character);
    }
}
